﻿<%@ Page Language="C#" MasterPageFile="~/BasicBase/BasicBase.master" AutoEventWireup="true"
    CodeFile="InsertKeyUnit.aspx.cs" Inherits="BasicBase_KeyUnit_NewKeyUnit" Title="无标题页"
    StylesheetTheme="Content" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%" cellpadding="0" cellspacing="0" class="intable">
        <caption>
            <asp:Label runat="server" ID="caption"> 重点单位基本信息</asp:Label>
        </caption>
        <tr>
            <td style="width: 12%">
                单位名称：
            </td>
            <td style="width: 38%">
                <asp:TextBox ID="txtUnitName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rvfKeyUnitName" runat="server" ControlToValidate="txtUnitName"
                    ErrorMessage="*" ValidationGroup="1"></asp:RequiredFieldValidator>
            </td>
            <td style="width: 12%">
                类型：
            </td>
            <td style="width: 38%">
                <asp:Label ID="lblStandard" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                法人代表：
            </td>
            <td>
                <asp:TextBox ID="txtCorporation" runat="server"></asp:TextBox>
            </td>
            <td>
                联系电话：
            </td>
            <td>
                <asp:TextBox ID="txtCorpTel" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                消防负责人：
            </td>
            <td>
                <asp:TextBox ID="txtPrincipal" runat="server"></asp:TextBox>
            </td>
            <td>
                联系电话：
            </td>
            <td>
                <asp:TextBox ID="txtPricTel" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                占地面积：
            </td>
            <td>
                <asp:TextBox ID="txtZDArea" runat="server"></asp:TextBox>
                m<sup>2</sup><ajaxToolkit:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="txtZDArea"
                    FilterType="Custom, Numbers" ValidChars="." />
            </td>
            <td>
                建筑面积：
            </td>
            <td>
                <asp:TextBox ID="txtJZhArea" runat="server"></asp:TextBox>
                m<sup>2</sup><ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
                    TargetControlID="txtJZhArea" FilterType="Custom, Numbers" ValidChars="." />
            </td>
        </tr>
        <tr>
            <td>
                所有制形式：
            </td>
            <td>
                <asp:DropDownList ID="ddlPossessive" runat="server" Width="160px">
                    <asp:ListItem>公有制</asp:ListItem>
                    <asp:ListItem>私有制</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                职工（机关）人数:
            </td>
            <td>
                <asp:TextBox ID="txtPeople" runat="server"></asp:TextBox>&nbsp;
                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server"
                    TargetControlID="txtPeople" FilterType="Numbers" />
            </td>
        </tr>
        <tr>
            <td>
                固定资产：
            </td>
            <td>
                <asp:TextBox ID="txtAsserts" runat="server"></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender
                    ID="FilteredTextBoxExtender2" runat="server" TargetControlID="txtAsserts" FilterType="Custom, Numbers"
                    ValidChars="." />
                万元
            </td>
            <td>
                年总产值：
            </td>
            <td>
                <asp:TextBox ID="txtIncome" runat="server"></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender
                    ID="FilteredTextBoxExtender3" runat="server" TargetControlID="txtIncome" FilterType="Custom, Numbers"
                    ValidChars="." />
                万元
            </td>
        </tr>
        <tr>
            <td>
                辖区单位：
            </td>
            <td>
                <asp:DropDownList ID="DepartmentList" runat="server" AutoPostBack="True" DataTextField="ShortName"
                    DataValueField="DepartmentID" OnSelectedIndexChanged="DepartmentList_SelectedIndexChanged1">
                </asp:DropDownList>
                <asp:DropDownList ID="UnitList" runat="server" DataTextField="FullName" 
                    DataValueField="DepartmentID" 
                    onselectedindexchanged="UnitList_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
            <td>
                详细地址：
            </td>
            <td>
                <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                经度：
            </td>
            <td>
                <asp:TextBox ID="txtJingDu" runat="server"></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender
                    ID="FilteredTextBoxExtender5" runat="server" TargetControlID="txtJingDu" FilterType="Custom, Numbers"
                    ValidChars="." />
            </td>
            <td>
                纬度：
            </td>
            <td>
                <asp:TextBox ID="txtWeiDu" runat="server"></asp:TextBox><ajaxToolkit:FilteredTextBoxExtender
                    ID="FilteredTextBoxExtender6" runat="server" TargetControlID="txtWeiDu" FilterType="Custom, Numbers"
                    ValidChars="." />
            </td>
        </tr>
        <%--  <tr>
            <td colspan="4">
                四邻情况：
            </td>
        </tr>--%>
        <tr>
            <td>
                东邻：
            </td>
            <td>
                <asp:TextBox ID="txtEast" runat="server"></asp:TextBox>
            </td>
            <td>
                西邻：
            </td>
            <td>
                <asp:TextBox ID="txtWest" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                南邻：
            </td>
            <td>
                <asp:TextBox ID="txtSouth" runat="server"></asp:TextBox>
            </td>
            <td>
                北邻：
            </td>
            <td>
                <asp:TextBox ID="txtNorth" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="4">
                <%-- <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="upBind">
                    <ProgressTemplate>
                        请等待……</ProgressTemplate>
                </asp:UpdateProgress>--%>
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" 
                    ValidationGroup="1" />
            </td>
        </tr>
        <tr>
            <td align="center" colspan="4">
                <a target="_blank" href="../Instruction/重点单位信息录入说明.doc">查看填写说明</a>&nbsp; <span class="comment">
                    咨询电话：（战训处）0311-89181132、（通讯处）0311-89181160</span>
            </td>
        </tr>
    </table>
    <%--  <asp:UpdatePanel ID="upBind" runat="server">
        <ContentTemplate>--%>
    <asp:Label ID="lblInfo" runat="server" ForeColor="#FF8000"></asp:Label>
    <asp:GridView ID="gvKeyUnits" runat="server" AutoGenerateColumns="False" DataKeyNames="KeyUnitID"
        OnRowDeleting="gvKeyUnits_RowDeleting" Caption="<span>重点单位列表</span>">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblNo" Text='<%# Container.DataItemIndex+1 %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="5%" />
            </asp:TemplateField>
            <asp:BoundField DataField="UnitName" HeaderText="重点单位名称" />
            <asp:BoundField DataField="Address" HeaderText="详细地址" ItemStyle-Width="20%" />
            <asp:TemplateField HeaderText="辖区中队">
                <ItemTemplate>
                    <%# getDepartmentName(Eval("DepartmentId"))%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="消防力量">
                <ItemTemplate>
                    <asp:HyperLink ID="hlFroce" runat="server" NavigateUrl='<%#"FireForce.aspx?uid="+Eval("KeyUnitID").ToString() %>'
                        Text="消防力量"></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="消防设施">
                <ItemTemplate>
                    <asp:HyperLink ID="hlSystem" runat="server" NavigateUrl='<%# "Service.aspx?uid="+Eval("KeyUnitID").ToString() %>'
                        Text="消防设施"></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="重点部位">
                <ItemTemplate>
                    <asp:HyperLink ID="hlPoint" runat="server" NavigateUrl='<%# "KeyPoint.aspx?uid="+Eval("KeyUnitID").ToString() %>'
                        Text="重点部位"></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <a href='<%# Eval("KeyUnitID", "KeyUnitView.aspx?ID={0}") %>'>
                        <img src="../../Images/Report.gif" border="0" alt="报表"></a> <a href='<%# Eval("KeyUnitID", "UpdateKeyUnit.aspx?ID={0}") %>'>
                            <img src="../../Images/Edit.gif" border="0" alt="编辑记录"></a>
                    <asp:ImageButton ID="ButtonDelete" runat="server" ImageUrl="~/Images/Delete.gif"
                        ToolTip="删除记录" CommandName="Delete" OnClientClick="return confirm('你确定要删除此重点单位的数据吗?');" />
                </ItemTemplate>
                <HeaderStyle Width="42" />
                <ItemStyle HorizontalAlign="Right" />
            </asp:TemplateField>
        </Columns>
        <RowStyle HorizontalAlign="Left" />
        <HeaderStyle HorizontalAlign="Left" />
    </asp:GridView>
    <asp:Panel Width="100%" runat="server" ID="panPage" Visible="false">
        <div style="padding: 4px;">
            <div style="float: left">
                <asp:Label ID="lbGridInfo" runat="server"></asp:Label>
            </div>
            <div style="float: right">
                <asp:LinkButton ID="btnFirst" runat="server" CommandArgument="First" CommandName="Page"
                    OnClick="btnFirst_Click">首页</asp:LinkButton>
                <asp:LinkButton ID="btnPrev" runat="server" CommandArgument="Prev" CommandName="Page"
                    OnClick="btnPrev_Click">上一页</asp:LinkButton>
                <asp:LinkButton ID="btnNext" runat="server" CommandArgument="Next" CommandName="Page"
                    OnClick="btnNext_Click">下一页</asp:LinkButton>
                <asp:LinkButton ID="btnLast" runat="server" CommandArgument="Last" CommandName="Page"
                    OnClick="btnLast_Click">末页</asp:LinkButton>
                转到：第
                <asp:DropDownList ID="JumpList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="JumpList_SelectedIndexChanged">
                </asp:DropDownList>
                页
            </div>
        </div>
    </asp:Panel>
    <%--  </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="gvKeyUnits" EventName="RowDeleting" />
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="DepartmentList" EventName="SelectedIndexChanged" />
        </Triggers>
    </asp:UpdatePanel>--%>
</asp:Content>
